-
Notifications
You must be signed in to change notification settings - Fork 1.1k
improve the generic signatures for singleton types #24288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @@ -0,0 +1 @@ | |||
| public <B> B Foo.bar(B) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was public <B> java.lang.Object Foo.bar(B) before.
sjrd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a coding style comment. Otherwise LGTM.
|
What about singleton types inside type arguments? |
Can you write an example where it doesn't work? I know that my PR doesn't cover this for example: class Foo[T]:
val x: T = ???
def foo: x.type = ???I meant to create a separate issue for it and just fix the one I linked here. |
When generating the generic signature of a singleton type, instead of relying on the erased type, generate it from its underlying type.
Closes #24272